#include <stdio.h>

double fun(int x[]) {
    double sum = 0.0;
    int c = 0, i = 0;
    while (x[i] != 0) {
        if (x[i] > 0) {
            sum += x[i];
            c++;
        }
        i++;
    }
    sum /= c;
    return sum;
}

int main() {
    int x[1000];
    int i = 0;
    printf("\nPlease enter some data (end)");
    do {
        scanf_s("%d", &x[i]);
    } while (x[i++] != 0);
    printf("%f\n", fun(x));
    return 0;
}